package com.punai.monthanalysis.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.punai.common.core.domain.BaseEntity;
import com.punai.externalccb.domain.YdCbfeeiteminfoStandard;
import com.punai.monthanalysis.bo.ProYdcbfxCbdzdBo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.punai.monthanalysis.mapper.ProYdcbfxCbdzdMapper;
import com.punai.monthanalysis.domain.ProYdcbfxCbdzd;
import com.punai.monthanalysis.service.IProYdcbfxCbdzdService;

/**
 * 成本对账单Service业务层处理
 *
 * @author zxw_
 * @date 2023-04-19
 */
@Service
public class ProYdcbfxCbdzdServiceImpl extends ServiceImpl<ProYdcbfxCbdzdMapper,ProYdcbfxCbdzd> implements IProYdcbfxCbdzdService {
    @Autowired
    private ProYdcbfxCbdzdMapper proYdcbfxCbdzdMapper;



    @Override
    public List<? extends BaseEntity> getTabsDataList(String proId,String monthId,List<YdCbfeeiteminfoStandard> list,List<YdCbfeeiteminfoStandard> categoryList) {
        List<ProYdcbfxCbdzd> proYdcbfxCbdzds = proYdcbfxCbdzdMapper.selectList(
                Wrappers.<ProYdcbfxCbdzd>lambdaQuery()
                        .eq(ProYdcbfxCbdzd::getProId, proId)
                        .orderBy(true,true, ProYdcbfxCbdzd::getXh)
        );
        return ProYdcbfxCbdzdBo.convert(proYdcbfxCbdzds);
    }
}
